package com.share.design.status.demo01;

/**
 * 5 - 待取件
 * @author caifan
 * @since 2022/11/6
 */
public class WaitForPickUp implements PackageState {
    // 单例
    private static WaitForPickUp instance = new WaitForPickUp();

    private WaitForPickUp() {}

    public static WaitForPickUp getInstance() {
        return instance;
    }


    @Override
    public void updateState(PackageContext ctx) {
        System.out.println("5-等待收件");
        ctx.setCurrentState(Received.getInstance());
    }
}
